<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div:not(#app){
      padding: 50px;
      border: 1px solid #333;
    }
    #div1{
      background-color: rgb(155, 125, 125);
    }
    #div2{
      background-color: rgb(129, 230, 34);
    }
    #div3{
      background-color: rgb(22, 120, 150);
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="div1" @click.capture="fn1">
      <div id="div2" @click.capture="fn2">
        <div id="div3" @click="fn3">
         
        </div>
      </div>
      
    </div>
    <button @click.once="fn3">按钮</button>
  
  </div>
  <script src="./vue.js"></script>
  <script>
    var a = 10;
    const vm = new Vue({
      el: '#app',
      data: {
        msg: '你好世界',
        
      },
      methods: {
        fn1(){
          alert(1)
        },
        fn2(){
          alert(2)
        },
        fn3(){
          alert(3)
        }
      }
    })
    // btn.addEventListener('事件',回调函数,[false/true])
  </script>
</body>
</html>